<?php
use Monolog\Logger;
use Monolog\Handler\StreamHandler;

// 确保logs目录存在
$logDir = dirname(__DIR__).'/storage/logs';
if (!is_dir($logDir)) {
    mkdir($logDir, 0755, true);
}

// 初始化日志服务
$logger = new Logger('college-spider');
$logger->pushHandler(new StreamHandler($logDir.'/college-spider.log'));


